<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作者详情</title>
</head>
<body>
    <h1>作者详情</h1>
    <hr>
    <p>作者姓名：{{ author.name }}</p>
    <p>作者年龄：{{ author.age }}</p>
    <p>作者性别：{{ '男' if author.sex else '女' }}</p>
    <p>作者邮箱：{{ author.email }}</p>
    
    <h2>该作者的书籍：</h2>
    <ul>
    {% for book in author.books %}
        <li><a href="/bookdetail/{{ book.id }}/">{{ book.title }}</a></li>
    {% endfor %}
    </ul>
    
    <p><a href="/booklist/">返回书籍列表</a></p>
</body>
</html>